//
// Created by 28735 on 2024/11/22.
//

#ifndef ADJACENTLIST_H
#define ADJACENTLIST_H

#define MAXSIZE 100

typedef enum { DG, DN, UDG, UDN } GraphKind;

/*  c implement*/
typedef struct
{
}Info;

typedef struct Edge
{
    //顶点在数组的位置
    int index;
    int value;
    Edge* next;
}* Edge_ptr;

typedef struct Vertex
{
    Info info;
    Edge_ptr first;
}* Vertex_ptr, Vertex_list_c[MAXSIZE];

typedef struct
{
    Vertex_list_c vertex_list_c{};
    int Edge_count{};
    int Vertex_count{};
    GraphKind kind = DG;
}LGraph;


#endif //ADJACENTLIST_H
